#version 330 core
in vec3 vNormal;
in vec3 vWorldPos;
uniform vec3 uLightDir;
uniform float uAmbient;
uniform vec3 uColor;
out vec4 FragColor;
void main(){
    vec3 N = normalize(vNormal);
    vec3 L = normalize(-uLightDir);
    float diff = max(dot(N,L),0.0);
    float l = clamp(uAmbient + diff, 0.0, 1.0);
    FragColor = vec4(uColor * l, 1.0);
}